package com.yejiali.backend.entity.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author:yejiali
 * @Date:2025/5/19-05-19-14:25
 * @Decsription:com.yejiali.backend.entity.dto
 * @Version:1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "病人信息")
public class PatientsDTO {
    //姓名
    @NotNull(message = "姓名不能为空")
    private String name;
    //身份证号（唯一索引）
    @NotBlank(message = "身份证号不能为空")
    @Pattern(regexp = "^[1-9]\\d{5}(19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$", message = "身份证号格式不正确")
    private String cardId;
    //社保卡号
    @NotBlank(message = "社保卡号不能为空")
    private String socialNum;
    //性别：0-男 1-女
    @NotNull(message = "性别不能为空")
    private Integer sex;
    //出生日期
    @NotNull(message = "出生日期不能为空")
    private Date birthDate;
    //联系方式（手机/固话）
    @NotNull(message = "手机号不能为空")
    private String phoneNumber;
    //住址
    @NotNull(message = "住址不能为空")
    private String address;
}
